package engine.newUi
{
	import newx.com.config.StaticIni;

	public class SkillStree
	{
		private var _curr:int=0;
		private var _next:int=0;
		private var _congfigid:int;
		private var _skillArr:Array =[];
		private var _isLearn:Boolean =false;
		public function SkillStree(configid:int):void
		{
			_congfigid = configid;
		}
		public function get configid():int
		{
			return _congfigid;
		}
		public function get isLearn():Boolean
		{
			if(_curr!=0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		public function get curr():int
		{
			return _curr;
		}
		public function set curr(val:int):void
		{
			_curr = val ;
		}
		public function get next():int
		{
			return _next;
		}
		public function set next(val:int):void
		{
			_next = val;
		}
		public function getPre(id:int):int
		{
			_skillArr =StaticIni.getIniVar(configid,"Skill").split(",");
			
			for(var i:int =0; i< _skillArr.length; i++)
			{
				if(_skillArr[i] == id && i>0)
				{
					
					return _skillArr[i-1];
				}
			}
			return 0
		}
	}
}